<%--
说明：用户组可选择的授权资源 页面

@author liuxun 2012-03-26
--%>
<%@ include file="../../common/common.jsp"%>
<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<title>用户组可选择的授权资源</title>
<script src="jsp/accessctl/d_acl/d_acl_usrgrp_not_selected_auth_rsc.js" type="text/javascript" charset="UTF-8"></script>
<style type="text/css">
.tableRow {
	text-align: center; 
	background-color: #f3f7fd; 
	border-top-width: 1px;
	border-right-width: 1px;
	border-top-style: solid;
	border-right-style: solid;
	border-bottom-style: none;
	border-left-style: none;
	border-top-color: #FFFFFF;
	border-right-color: #FFFFFF;
}
</style>
</head>

<body>
  <%-- 查询条件form --%>
  <form id="opeForm" name="opeForm" method="post">
    <%-- 授权对象ID --%>
    <input type="hidden" id="auth_obj_id" name="model.auth_obj_id" value="${model.auth_obj_id}" />
    <%-- 用户组ID --%>
    <input type="hidden" id="rsc_grp_id" name="model.rsc_grp_id" value="${rsc_grp_id}"/>
    
    <table id="rscTable" width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
      <tr class="tableRow">
              <td align="right" valign="middle" nowrap="nowrap">节点名称：</td>
              <td align="left" valign="middle" nowrap="nowrap">
                <ext:select id="node_id" name="model.node_id" cachetype="P_NODE" nameprop="node_name" valueprop="node_code" condnames="node_status" condvalues="01" initvalue="${model.node_id}" style="width:100px" orderby="node_code desc" cannull="1" /> &nbsp;
              </td>      
              <td align="right" valign="middle" nowrap="nowrap">资源组：</td>
              <td align="left" valign="middle" nowrap="nowrap">
              <input type="text" id="rsc_grp_name" class="editMainText" name="model.rsc_grp_name" value="${model.rsc_grp_name}" readonly="readonly" maxlength=150 /> 
              <img onclick="select_c_rsc_grp();" style="cursor: hand" title="选择" src="<c:url value="/images/eclipse/select.gif" />" /> &nbsp;</td>
              <td align="right" valign="middle" nowrap="nowrap">资源名称：</td>
              <td align="left" valign="middle" nowrap="nowrap">
              	<input type="text" id="rsc_name" name="model.rsc_name" value="${model.rsc_name}" class="inputText"/> &nbsp;
              </td>

              <td align="left" valign="middle" width="40%">
	              <a href="javascript:void(0)" id="queryBtn" name="queryBtn" icon="icon-search" class="easyui-linkbutton">查询</a>
	              <a href="javascript:void(0)" id="clearBtn" name="clearBtn" icon="icon-cancel" class="easyui-linkbutton">清空</a>
              </td>
              <td colspan="6" align="center" valign="middle" width="50%">&nbsp;</td>
      </tr>
      
      <tr style="width: 100%" class="tableRow">
        <td class="" colspan="10" width="100%">
          <table id="listTable" width="100%">
          <thead>
      <tr align="center" style="text-align: center; width: 100%">
        <td class="tableRow" align="center" style="width: 4%;" nowrap="nowrap">
        	<input type="checkbox" onclick="checkAll(this)"/>
        </td>
        <td class="tableRow" align="center" style="width: 8%;" nowrap="nowrap">节点名称</td>
      	<td class="tableRow" align="center" style="width: 12%;" nowrap="nowrap">资源组</td>
      	<td class="tableRow" align="center" style="width: 15%;" nowrap="nowrap">资源</td>
      	<td class="tableRow" align="center" style="width: 8%;" nowrap="nowrap">账号</td>
      	<td class="tableRow" align="center" style="width: 7%;" nowrap="nowrap">协议</td>
      	<td class="tableRow" align="center" style="width: 5%;" nowrap="nowrap">端口</td>
      	<td class="tableRow" align="center" style="width: 5%;" nowrap="nowrap">运维目的</td>
      	<td class="tableRow" align="center" style="width: 4%;" nowrap="nowrap">长期有效</td>
      	<td class="tableRow" align="center" style="width: 14%;" nowrap="nowrap">开始时间</td>
      	<td class="tableRow" align="center" style="width: 5%;" nowrap="nowrap">有效期(分钟)</td>
      	<td class="tableRow" align="center" style="width: 10%;" nowrap="nowrap">命令策略</td>
      </tr>
      </thead>    
      <tbody>
      <c:forEach var="rsc" items="${pagedRecords.list}" varStatus="status">
	  	<tr>
          <td class="tableRow" align="center" nowrap="nowrap" style="width:4%;">
          	<input type="checkbox" name=""/>
          </td>	  	
          <td class="tableRow" align="center" style="width: 8%;">
          <input type="hidden" id="node_id_${status.index}" value="${rsc.NODE_ID}" />
          	${rsc.NODE_DECODE}
          </td>          
          <td class="tableRow" align="center" style="width: 12%;">
          	${rsc.RSC_GRP_NAME}
          </td>
          <td class="tableRow"  align="left" style="width: 15%;" nowrap="nowrap">
          <input type="hidden" id="rsc_id_${status.index}" value="${rsc.RSC_ID}" />
          	${rsc.RSC_NAME}
          </td>
          <td class="tableRow" align="center" style="width: 8%;">
          	<input type="hidden" id="rsc_acc_id_${status.index}" value="${rsc.RSC_ACC_ID}" />
          	${rsc.RSC_ACC}
          </td>
          <td class="tableRow" align="center" style="width: 7%;">
          <input type="hidden" id="rsc_pro_id_${status.index}" value="${rsc.RSC_PRO_ID}" />
          	${rsc.PRO_NAME}
          </td>
          <td class="tableRow" align="center" style="width: 5%;">
          	${rsc.PORT}
          </td>
          <td class="tableRow" align="center" style="width: 5%;">
          	<ext:select id="operation_type_${status.index}" name="model.operation_type" cachetype="P_TYPE_VALUE" nameprop="type_value_name" valueprop="type_value_code" condnames="type_code" condvalues="121" initvalue="" style="width:80px" orderby="type_value_code" />
          </td>       
          <td class="tableRow" align="center" style="width: 4%;">
          	<select id="is_longterm_valid_${status.index}" onchange="is_longterm_valid(${status.index})" style="width: 80%">
          		<option value="1">是</option>
          		<option value="0">否</option>
          	</select>
          </td>
          <td class="tableRow" align="left" style="width: 14%; text-align: left;">
          	<input type="text" id="start_time_${status.index }" disabled="disabled" value="" readonly="readonly" style="width: 130px" class="easyui-validatebox  editMainText" maxlength=19 />
          	<img id="img_${status.index }" style="display: none;" src="<c:url value="/images/datetimepicker_css/cal.gif" />" onclick="javascript:NewCssCal ('start_time_${status.index }','yyyyMMdd','dropdown',true,'24',true,'future')" style="cursor: pointer" /> 
          </td>
          <td class="tableRow" align="center" style="width: 5%;" nowrap="nowrap">
          	<input type="text" id="available_length_${status.index}" disabled="disabled" style="width: 98%" class="easyui-validatebox" validType="digit" />
          </td> 
          <td class="tableRow" align="center" style="width: 10%;">
          	<input type="hidden" id="policy_id_${status.index}" />
          	<input type="text" id="policy_name_${status.index}" readonly="readonly" style="width: 98%" class="easyui-validatebox" validType="" onclick="select_cmdpolicy(${status.index})" />
          	<%-- <input type="button" id="policy_select" name="policy_select" onclick="select_cmdpolicy(${status.index})"></input> --%> 
          </td>
      </tr>
	  </c:forEach>
	  <tr align="center" style="text-align: center; width: 100%">
        <td class="tableRow" align="right" style="height:14px; width: 100%; height:30px; text-align: right;" colspan="12" >
      		第  ${pagedRecords.page} 页 / 共  ${pagedRecords.totalPage} 页(共  ${pagedRecords.totalNum} 条记录)&nbsp;&nbsp;&nbsp;&nbsp; 
		    	<c:if test="${!pagedRecords.firstPage}">
					<a href="javascript:turn(1);">首页</a>&nbsp;&nbsp;
					<a href="javascript:turn(<c:out value="${pagedRecords.page-1}"/>);">上一页</a>&nbsp;&nbsp;
				</c:if>		 
				<c:if test="${!pagedRecords.lastPage}">
					<a href="javascript:turn(<c:out value="${pagedRecords.page+1}"/>);">下一页</a>&nbsp;&nbsp;
    			    <a href="javascript:turn(<c:out value="${pagedRecords.totalPage}"/>);">末页</a>&nbsp;&nbsp;
				</c:if> 
				<input type="hidden" id="page" name="page" value="<c:out value="${pagedRecords.page+1}"/>" size="4">&nbsp;&nbsp;
				<%-- 
				<input type="text" name="page" value="<c:out value="${pagedRecords.page+1}"/>" size="4">&nbsp;&nbsp;
				<input type="submit" class="infoDisBottomButton" value="GO">&nbsp;&nbsp;&nbsp;&nbsp;
				--%>		
        </td>
      </tr>
	  </tbody>
          </table>
          </td>
      </tr>
      <tr style="height: 100%">
        <td class="tableRow" colspan="10">
        </td>
       </tr>
      <tr>
        <td class="editMainBottomTD" colspan="13">&nbsp;
          <div style="text-align: content; padding: 5px; padding-bottom: 35px">
           <a href="javascript:void(0)" id="okBtn" icon="icon-save" class="easyui-linkbutton">保存</a> <a href="javascript:void(0)" id="cancelBtn" icon="icon-cancel" class="easyui-linkbutton">取消</a>
          </div></td>
      </tr>
    </table>
  </form>

</body>
</html>
